package com.kaifamiao.month05.day18;

import org.junit.Before;
import org.junit.Test;

import java.sql.Connection;
import java.sql.SQLException;

public class MyDataSourceTest {

    MyDataSource data;
    @Before
    public void init() {
        data = new MyDataSource();
    }

    @Test
    public void get() throws SQLException {
        for (int i = 0; i < 10; i ++) {
            Connection conn = data.getConnection();
            System.out.println(conn);
            conn.close();

        }
    }

}
